/** Import everything needed **/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;



/**
 * This is a class for home panel
 * @author Code traders
 * @version 1.0
 */
public class HomePanel extends JPanel implements MainPanel {
	
	/**
	 * serialVersionUID for the HomePanel class
	 */
	private static final long serialVersionUID = 1268202019634387081L;
	
	/**
	 * JLabel for the homeImage;
	 */
	private final JLabel homeImage;
	
	/**
	 * Width and height for the JPanel
	 */
	private static final int WIDTH = 640, HEIGHT = 252;
	
	/** for 454 */
	private static final int F_HUNDRED_F_F = 454;
	
	/** for 13 */
	private static final int THIRTEEN = 13;
	
	/** for 174 */
	private static final int O_HUNDRED_S_F = 174;
	
	/** for 220 */
	private static final int T_HUNDRED_T_O = 220;
	
	/** for 255 */
	private static final int T_HUNDRED_F_F = 255;
	
	/** for 204 */
	private static final int T_HUNDRED_F = 204;
	
	/** for 20 */
	private static final int TWENTY = 20;
	
	/** for 48 */
	private static final int FORTYEIGHT = 48;
	
	/** for 424 */
	private static final int F_HUNDRED_T_F = 424;
	
	/**
	 * Create the panel.
	 */
	public HomePanel() {
		super.setPreferredSize(new Dimension(WIDTH, HEIGHT));
		
		final Icon imgIcon = new ImageIcon(SpaceTraderMainGUI.class.getResource(
				"/image/moving_animated_alien_s.gif"));
		super.setLayout(null);
		homeImage = new JLabel(imgIcon);
		homeImage.setBounds(F_HUNDRED_F_F, THIRTEEN, O_HUNDRED_S_F, T_HUNDRED_T_O);
		super.add(homeImage);
		
		final JLabel homeLabel = new JLabel("Welcome To Space Traders!");
		homeLabel.setForeground(new Color(T_HUNDRED_F_F, T_HUNDRED_F_F, T_HUNDRED_F));
		homeLabel.setFont(new Font("Matura MT Script Capitals", Font.PLAIN, TWENTY));
		homeLabel.setBounds(FORTYEIGHT, THIRTEEN, F_HUNDRED_T_F, T_HUNDRED_T_O);
		super.add(homeLabel);
		
		homeLabel.setText("<html>" + homeLabel.getText() + 
				"<br><br> \"Map\" shows your current location." +
				"<br> Choose a planet and press \"turn\" to travel." +
				"<br> \"Items\" lets you fuel your ship or buy items." +
				"<br> \"Store\" is unique for each planet." +
				"<br> \"Info\" shows your information." +
				"</html>");

	}
	
	/**
	 * updates the panel
	 */
	public void update() {
		System.out.print("");
	}
}
